package cn.manyufun.myf.ui.comics.contract;

import cn.manyufun.myf.bean.BaseBean;
import cn.manyufun.myf.bean.ComicsDetailBean;
import cn.manyufun.myf.common.base.BaseModel;
import cn.manyufun.myf.common.base.BasePresenter;
import cn.manyufun.myf.common.base.BaseView;
import rx.Observable;

/**
 * Created by Xiao on 2018-02-06.
 */

public interface ComicsDetailContract {
    int ACTION_FOLLOW = 1;
    int ACTION_UNFOLLOW = 2;

    interface Model extends BaseModel {
        Observable<ComicsDetailBean> getComicsDetailData(long comicsId);

        Observable<BaseBean> followComics(int actionType, long comicsId);
    }

    interface View extends BaseView {
        //返回获取的新闻
        void returnComicsDetailData(ComicsDetailBean newsSummaries);

        void returnFollowComics(BaseBean baseBean, int actionType);

        void reloadComicsDetail();
    }

    abstract static class Presenter extends BasePresenter<ComicsDetailContract.View, ComicsDetailContract.Model> {
        //发起获取新闻请求
        public abstract void getComicsDetailDataRequest(long comicsId);

        public abstract void followComicsRequest(int actionType, long comicsId);
    }
}
